+((w) => {
    w.utils.fade = function (element, bol, transitionTime=0.2) {
        element.style.opacity = "1"
        if (!bol) {
            element.style.transition = `${transitionTime}s`
            element.style.opacity = 0   
            setTimeout(() => {
                //  要修改display为none不然会占用网页空间
                element.style.display = 'none'
            }, transitionTime*1000)
        } else {
            element.style.transition = `${transitionTime}s`
            element.style.opacity = "1"
            setTimeout(() => {
                element.style.display = "block"
            }, transitionTime*1000)
        }
    }

    w.utils.zoom = (element) => {
        element.style.transition = "0.3s";
        element.style.transform = "scale(1.6)";
        setTimeout(() => {
            element.style.transform = "scale(1)";
        }, 200);
    }
})(window)